﻿using System;

namespace BizElements.Generator.EntityComponents
{
    /// <summary>
    /// Contains commonly used generic procedure and function delegates.
    /// </summary>
    static class Delegates
    {
        /// <summary>
        /// Represents a parameterless method that returns a value of the specified type.
        /// </summary>
        /// <typeparam name="TRetVal">Type of the return value.</typeparam>
        /// <returns>A value of the specified type.</returns>
        public delegate TRetVal Function<TRetVal>();

        /// <summary>
        /// Represents a method that accepts one argument and returns a value of the specified type.
        /// </summary>
        /// <typeparam name="TRetVal">Type of the return value.</typeparam>
        /// <typeparam name="TArg">Argument type.</typeparam>
        /// <param name="arg">Method argument.</param>
        /// <returns>A value of the specified type.</returns>
        public delegate TRetVal Function<TRetVal, TArg>(TArg arg);
    }
}